package com.spring.annotation.connectDatabase;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * Created by wangyg on 2017/1/12.
 */
@Configuration
@ImportResource("classpath:spring-connectdatabase.xml")
public class TestConfig {

	@Value("${jdbc.username}")
	private String username;
	@Value("${password}")
	private String password;
	@Value("${url}")
	private String url;

	@Bean
	public MyDriverManager myDriverManager(){
		return new MyDriverManager(url,username,password);
	}

}
